﻿@model FilmBookingTicket.Models.ShowTime

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <table class="table striped bordered hovered" style="margin: 0px 0px 0px 40px">
        <tr>
            <td>
                <div class="editor-label">
                    @Html.LabelFor(model => model.Time)
                </div>
            </td>
            <td>

                <div class="editor-label">
                    @Html.LabelFor(model => model.Date)
                </div>
            </td>
            <td>
                <div class="editor-label">
                    @Html.LabelFor(model => model.IsActive)
                </div>
            </td>
            <td>

                <div class="editor-label">
                    @Html.LabelFor(model => model.TheaterId, "Theater")
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="input-control text">
                    @Html.EditorFor(model => model.Time)
                    @Html.ValidationMessageFor(model => model.Time)
                </div>

            </td>
            <td>
                <div class="input-control text" style="width:100px">
                    @Html.TextBoxFor(model => model.Date, new {id="output"})
                    @Html.ValidationMessageFor(model => model.Date)
                </div>
            </td>
            <td>
                <div class="input-control text">
                    @Html.EditorFor(model => model.IsActive)
                    @Html.ValidationMessageFor(model => model.IsActive)
                </div>
            </td>
            <td>
                <div class="input-control text">
                    @Html.DropDownList("TheaterId", String.Empty)
                    @Html.ValidationMessageFor(model => model.TheaterId)
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <input type="submit" value="Create" />
            </td>
        </tr>
        <tr>
            <td>
       
            </td>
        </tr>
    </table>
    <div  style="margin: 0px 0px 0px 40px">
        <div id='cal-events' class="calendar small" data-role="calendar" data-week-start="1"></div>
    </div>
             <div>
                    @Html.ActionLink("Back to List", "Index")
                </div>
    <script>
        (function () {
            var cal = $("#cal-events").calendar({
                multiSelect: false,
                click: function (d) {
                    $('#output').val(d);
                }
            });
        }).call();
    </script>
}
  